/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.math.BigDecimal;

/**
 * 生产领料Entity
 * @author HOHD
 * @version 2020-12-22
 */
@Table(name="st_product_material_form_bill_detail", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="material_name", attrName="materialName", label="物料名称", queryType=QueryType.LIKE),
		@Column(name="unit", attrName="unit", label="单位"),
		@Column(name="theory_number", attrName="theoryNumber", label="理论用量"),
		@Column(name="get_number", attrName="getNumber", label="领料数量"),
		@Column(name="case_number", attrName="caseNumber", label="件数"),
		@Column(name="batch_number", attrName="batchNumber", label="件数"),
		@Column(name="small_material_left", attrName="smallMaterialLeft", label="小料间余量"),
		@Column(name="theory_left", attrName="theoryLeft", label="理论剩余值"),
		@Column(name="material_type", attrName="materialType", label="原料类型"),
		@Column(name="parent_id", attrName="parentId.id", label="父 id"),
		@Column(name="primary_id", attrName="primaryId", label="父 id"),
	}, orderBy="a.id ASC"
)
public class StProductMaterialFormBillDetail extends DataEntity<StProductMaterialFormBillDetail> {
	
	private static final long serialVersionUID = 1L;
	private String materialName;		// 物料名称
	private String unit;		// 单位
	private BigDecimal theoryNumber;		// 理论用量
	private Integer getNumber;		// 领料数量
	private Integer caseNumber;		// 件数
	private BigDecimal smallMaterialLeft;		// 小料间余量
	private BigDecimal theoryLeft;		// 理论剩余值
	private Integer materialType;		// 原料类型
	private String batchNumber;
	private StProductMaterialFormBill parentId;		// 父 id 父类

	private String primaryId;

	public String getPrimaryId() {
		return primaryId;
	}

	public void setPrimaryId(String primaryId) {
		this.primaryId = primaryId;
	}

	public StProductMaterialFormBillDetail() {
		this(null);
	}


	public StProductMaterialFormBillDetail(StProductMaterialFormBill parentId){
		this.parentId = parentId;
	}
	
	@Length(min=0, max=36, message="物料名称长度不能超过 36 个字符")
	public String getMaterialName() {
		return materialName;
	}

	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}

	public String getBatchNumber() {
		return batchNumber;
	}

	public void setBatchNumber(String batchNumber) {
		this.batchNumber = batchNumber;
	}

	@Length(min=0, max=36, message="单位长度不能超过 36 个字符")
	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}
	
	public BigDecimal getTheoryNumber() {
		return theoryNumber;
	}

	public void setTheoryNumber(BigDecimal theoryNumber) {
		this.theoryNumber = theoryNumber;
	}
	
	public Integer getGetNumber() {
		return getNumber;
	}

	public void setGetNumber(Integer getNumber) {
		this.getNumber = getNumber;
	}
	
	public Integer getCaseNumber() {
		return caseNumber;
	}

	public void setCaseNumber(Integer caseNumber) {
		this.caseNumber = caseNumber;
	}
	
	public BigDecimal getSmallMaterialLeft() {
		return smallMaterialLeft;
	}

	public void setSmallMaterialLeft(BigDecimal smallMaterialLeft) {
		this.smallMaterialLeft = smallMaterialLeft;
	}
	
	public BigDecimal getTheoryLeft() {
		return theoryLeft;
	}

	public void setTheoryLeft(BigDecimal theoryLeft) {
		this.theoryLeft = theoryLeft;
	}
	
	public Integer getMaterialType() {
		return materialType;
	}

	public void setMaterialType(Integer materialType) {
		this.materialType = materialType;
	}
	
	@Length(min=0, max=36, message="父 id长度不能超过 36 个字符")
	public StProductMaterialFormBill getParentId() {
		return parentId;
	}

	public void setParentId(StProductMaterialFormBill parentId) {
		this.parentId = parentId;
	}
	
}